<script lang="ts" setup>
    import { useRouter } from 'vue-router'; // 引入 useRouter
    const router = useRouter(); // 获取路由实例
    // 跳转到登录页面的方法
    const goToLogin = () => {
    router.push('/login'); // 跳转到登录页面
    };

    const goToAdmin = ()=> {
      router.push('/admin');
    };
</script>

<template>
  <div>
    <!-- Header -->
            <header id="header">
                <span class="logo icon fa-paper-plane"></span>
                <h1>你好这里是吊图网</h1>
            </header>
  
        <main id="main">
            <section class="major container medium">
            <h2>
                欢迎来到我们的网站 
            </h2>
            </section>
    
        <footer class="major container medium">
          <h3>点击下面的按钮加入我们吧</h3>
          <p>
          </p>
          <ul class="actions special">
            <li><a href="#" class="button" @click="goToLogin">登录</a></li>
            <li><a href='#' class="button" @click="goToAdmin">admin</a></li>
          </ul>
        </footer>
      </main>
  
    </div>
  </template>



  
  <style scoped>
   @import '../../assets/css/main.css';
  </style>
  